import axios from 'axios'

export const request_user = axios.create({
    baseURL: 'http://localhost:1010',
    headers: {
        'Content-Type': 'application/json;charset=utf-8'
    },
    timeout: 10000
})

export const request_operation = axios.create({
    baseURL: 'http://localhost:1080',
    headers: {
        'Content-Type': 'application/json;charset=utf-8'
    },
    timeout: 10000
})
export const request_financial = axios.create({
    baseURL: 'http://localhost:1070',
    headers: {
        'Content-Type': 'application/json;charset=utf-8'
    },
    timeout: 10000
})

export const request_warehouse = axios.create({
    baseURL: 'http://localhost:1050',
    headers: {
        'Content-Type': 'application/json;charset=utf-8'
    },
    timeout: 10000
})
export default {request_user,request_operation,request_warehouse,request_financial }

// Service.interceptors.request.use((config)=>{
//     config.headers.common('Authorization') = window.sessionStorage.getItem('token')
// })
